namespace DataObjectLayer
{
    public class UserDOL
    {
        public const string Select = @"SELECT Security.[USER].USERID, Security.[USER].FIRSTNAME, Security.[USER].LASTNAME,Security.[USER].EMAIL, Security.[USER].USERNAME, Security.[USER].PASSWORD,[USER].EMAIL, Security.[USER].ISACTIVE, Security.[USER].ISADMIN FROM Security.[USER]";
        public const string Insert = @"INSERT INTO Security.[USER] (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,EMAIL, ISACTIVE, ISADMIN) VALUES(@FIRSTNAME,@LASTNAME,@USERNAME,@PASSWORD,@EMAIL, @ISACTIVE, @ISADMIN)";
        public const string Delete = "DELETE FROM Security.[USER] WHERE USERID=@USERID";
        public const string Update = "UPDATE Security.[USER] SET FIRSTNAME=@FIRSTNAME,LASTNAME=@LASTNAME,USERNAME = @USERNAME, PASSWORD = @PASSWORD,EMAIL=@EMAIL, ISACTIVE = @ISACTIVE, ISADMIN = @ISADMIN WHERE USERID=@USERID";
        public const string LockUser = @"UPDATE Security.[USER] SET ISACTIVE = 'False' WHERE USERNAME = @UserName";
        public const string CheckUserValid = @"SELECT COUNT(*) FROM Security.[USER] WHERE USERNAME = @UserName AND PASSWORD=@Password";
        public const string CheckUserLock = @"SELECT ISACTIVE FROM Security.[USER] WHERE USERNAME = @UserName";
        public const string ChangePassword = @"UPDATE Security.[USER] SET PASSWORD = @NewPassword WHERE USERNAME = @UserName";
        public const string LoadUserProfile = @"SELECT FIRSTNAME, LASTNAME,USERNAME, EMAIL, USERID, ISACTIVE ,ISADMIN FROM Security.[USER] WHERE USERNAME = @UserName";
        public const string SelectMaxId = "SELECT ISNULL(MAX(USERID),0)+1 AS MAX_ROLE_ID FROM Security.[USER]";
        public enum QueryStatus {Select, Insert, Delete, Update, SelectMaxId , LockUser, CheckUserValid, CheckUserLock, ChangePassword, LoadUserProfile };
    }
}
